﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Lucandra.Configuration
{
    public class IndexElement : ConfigurationElement
    {
        [ConfigurationProperty("name", IsRequired = true, IsKey = true)]
        public string Name
        {
            get { return (string)this["name"]; }
            set { this["name"] = value; }
        }

        [ConfigurationProperty("keyspace", IsRequired = true)]
        public string Keyspace
        {
            get { return (string)this["keyspace"]; }
            set { this["keyspace"] = value; }
        }

        [ConfigurationProperty("autoCreate", DefaultValue = false)]
        public bool AutoCreate
        {
            get { return (bool)this["autoCreate"]; }
            set { this["autoCreate"] = value; }
        }

        [ConfigurationProperty("autoCreateSettings", IsRequired = false)]
        public AutoCreateSettingsElement AutoCreateSettings
        {
            get { return (AutoCreateSettingsElement)this["autoCreateSettings"]; }
            set { this["autoCreateSettings"] = value; }
        }
    }
}
